package com.zhijian.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhijian.entity.CustomerService;
import com.zhijian.mapper.CustomerServiceMapper;
import com.zhijian.service.ICustomerServiceService;
import org.springframework.stereotype.Service;

@Service
public class CustomerServiceServiceImpl extends ServiceImpl<CustomerServiceMapper, CustomerService> implements ICustomerServiceService {
    
    @Override
    public CustomerService login(String username, String password) {
        QueryWrapper<CustomerService> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username", username)
                   .eq("password", password)
                   .eq("status", 1);
        return this.getOne(queryWrapper);
    }
} 